I am using SC16is752 UART driver in i2c mode. The part is interfaced to microcontroller running linux yocto build and uses i2c. I have dts updated as per the linux documentation. I have them connected under i2c dts node as follows.I see all SC0 to SC7 ports under /dev and I can send message thru the serial port and can receive it on PC. But from PC to the device will not work.In short rx wont work at all.
After debugging the linux kernel driver, I see rxISR is not called. Infact its not even called during SC16is7xx driver probe. In my hardware the messages are polled via i2c., then what is the significance of the interrupt parent and interrupts in the dts? My hardware has the IRQ(pin 15) tied to 3V. pin 13/14 has i2c clock and data. pls see dts below
sc16is752_0: sc16is752@4d {
compatible = "nxp,sc16is752";
reg = <0x4d>; // i2c address
clocks = <&sc16is752_clk_0>;
interrupt-parent = <&gpio2>;
interrupts = <7 0x2>;
};
sc16is752_1: sc16is752@48 {
compatible = "nxp,sc16is752";
reg = <0x48>; // i2c address
clocks = <&sc16is752_clk_1>;
interrupt-parent = <&gpio3>;
interrupts = <7 0x2>; //GPIO and falling edge
};
sc16is752_2: sc16is752@49 {
compatible = "nxp,sc16is752";
reg = <0x49>; // i2c address
clocks = <&sc16is752_clk_2>;
interrupt-parent = <&gpio1>;
interrupts = <7 0x2>; //GPIO and falling edge
};
sc16is752_3: sc16is752@4c {
compatible = "nxp,sc16is752";
reg = <0x4c>; // i2c address
clocks = <&sc16is752_clk_3>;
interrupt-parent = <&gpio0>;
interrupts = <7 0x2>; //GPIO and falling edge
};
sc16is752_clk_0: sc16is752_clk_0 {
compatible = "fixed-clock";
#clock-cells = <0>;
reg = <0>;
clock-frequency = <14745600>;
};
sc16is752_clk_1: sc16is752_clk_1 {
compatible = "fixed-clock";
#clock-cells = <0>;
reg = <0>;
clock-frequency = <14745600>;
};
sc16is752_clk_2: sc16is752_clk_2 {
compatible = "fixed-clock";
#clock-cells = <0>;
reg = <0>;
clock-frequency = <14745600>;
};
sc16is752_clk_3: sc16is752_clk_3 {
compatible = "fixed-clock";
#clock-cells = <0>;
reg = <0>;
clock-frequency = <14745600>;
};
. I dont think in the linux
kthread_init_worker(&s->kworker);
kthread_init_work(&s->irq_work, sc16is7xx_ist);
sc16is7xx_ist call back is setup, guessing probably the dts parsing for interrupt node is wrong.
And never see any calls from ISR
infact the transmission is happening from kthread_init_work(&s->p[i].tx_work, sc16is7xx_tx_proc);
The call to sc16is7xx_handle_tx is only happening from the sc16is7xx_tx_proc. Never see it called from
static bool sc16is7xx_port_irq(struct sc16is7xx_port *s, int portno)
Had been spending a good amount of time trouble shooting this!!! Any help appreciated