Configure 4 UARTs on two sc16is752 for mx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configure 4 UARTs on two sc16is752 for mx6ull

1,486 Views
nicholdraper202
Contributor II

We have a custom board with the mx6ull based on the evk.  We have removed the second Ethernet port and we are using SPI4.  We have two sc16is752 chips with two UARTs on each.  We should have seven total UARTs on the board.  I've made the following addition to the imx6ull-14x14-evk.dts file but I am not seeing the SPI devices.  I am also not sure how to indicate that these contain 4 more UARTs.

&ecspi4 {         pinctrl-names = "default";         pinctrl-0 = <&pinctrl_ecspi4>;         num-chipselects = <2>;         status = "okay";         sc16is752: sc16is752@0 {                 compatible = "nxp,sc16is752";                 reg = <0>;                 clocks = <&sc16is752_clk>;                 interrupt-parent = <&gpio5>;                 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;                 gpio-controller;                 #gpio-cells = <2>;                  sc16is752_clk: sc16is752_clk {                         compatible = "fixed-clock";                         #clock-cells = <0>;                         clock-frequency = <14745600>;                 };         };         sc16is752: sc16is752@0 {                 compatible = "nxp,sc16is752";                 reg = <1>;                 clocks = <&sc16is752_clk>;                 interrupt-parent = <&gpio5>;                 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;                 gpio-controller;                 #gpio-cells = <2>;         }; };  
Labels (3)
0 Kudos
4 Replies

1,118 Views
nicholdraper202
Contributor II

Just an update.  I back ported the sc16is7xx.c driver from linux 4.14.78 to linux 4.1.15.  I still get Kernel Panic if I try to compile any version later than 4.1.15 for the mx6ull.  I updated my dts file to have the following:

};

sc16is752a: sc16is752@0 {
compatible = "nxp,sc16is752";
reg = <0>;
clocks = <&sc16is752_ck>;
interrupt-parent = <&gpio5>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <1500000>;

sc16is752_ck: sc16is752_ck {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <14745600>;
};
};

sc16is752b: sc16is752@1 {
compatible = "nxp,sc16is752";
reg = <1>;
clocks = <&sc16is752_ck>;
interrupt-parent = <&gpio5>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <1500000>;
};

};
};

And I now see ttySC0 and ttySC1.  I should be seeing 4 uarts, not just two.  I'm not sure if I am seeing 1 uart from each sc16is752 or if I am seeing two uarts from one sc16is752.  Still working through this problem.  

0 Kudos

1,118 Views
jimmychan
NXP TechSupport
NXP TechSupport

which BSP are you using?

Is the driver is up during the board boot up? any error message?

0 Kudos

1,118 Views
nicholdraper202
Contributor II

I'm not seeing the spi driver during boot up.

A few errors on boot up.  I read somewhere that I needed to disable the fb driver for the spi driver to work.  I thought I had disabled it, but it still shows up in the /dev directory and the spi driver does not.  I also do see an error -22 on the ecspi probe.  I do see a number of failures.  I'll start digging into these.  It does indicate that I have spi4 misconfigured.

mxsfb 21c8000.lcdif: failed to find mxc display driver
Console: switching to colour frame buffer device 60x34
mxsfb 21c8000.lcdif: initialized

spi_gpio spi4: gpio-miso property not found, switching to no-rx mode
spi_imx: probe of 2014000.ecspi failed with error -22

fxls8471: probe of 0-001e failed with error -22
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0

mag3110: probe of 0-000e failed with error -22

wm8960 1-001a: Failed to issue reset
wm8960: probe of 1-001a failed with error -5
fsl-asrc 2034000.asrc: driver registered
imx-wm8960 sound: failed to find codec platform device
imx-wm8960: probe of sound failed with error -22

Starting advanced power management daemon: No APM support in kernel
(failed.)

0 Kudos

1,118 Views
nicholdraper202
Contributor II

We are using a custom board based on the mx6ull-14x14-evk.  We have just a few modifications from the EVK.  I have been modifying the imx6ull-14x14-evk.dts file, but this is the first time I've brought up a board since Linux switched to the device tree.  I recently found the pin tool and the Introduction to device trees https://www.nxp.com/docs/en/application-note/AN5125.pdf.  I was hoping someone had configured this before and could share some examples.  

0 Kudos