I’m trying to get 8 serialports on a imx7d+Iris, to do that, i activated uart5,uart 6 and added a max14830 to the spi bus. For this i altered the kernel config to include max310x and the default iris-v2 dts to this.
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Copyright 2017-2020 Toradex
*/
/dts-v1/;
#include "imx7d-colibri-emmc.dtsi"
#include "imx7-colibri-iris-v2.dtsi"
/ {
model = "Toradex Colibri iMX7D 1GB on Colibri Iris V2 Board";
compatible = "toradex,colibri-imx7d-emmc-iris-v2",
"toradex,colibri-imx7d-emmc",
"toradex,colibri-imx7d",
"fsl,imx7d";
};
&usbotg2 {
vbus-supply = <®_usbh_vbus>;
status = "okay";
};
&pwm1 {
status = "disabled";
/delete-property/pinctrl-0;
};
&pwm4 {
status = "disabled";
/delete-property/pinctrl-0;
};
&uart6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart6>;
assigned-clocks = <&clks IMX7D_UART6_ROOT_SRC>;
assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
fsl,dte-mode;
};
&uart7 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart7>;
assigned-clocks = <&clks IMX7D_UART7_ROOT_SRC>;
assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
fsl,dte-mode;
};
&ecspi3 {
/delete-node/spidev@0;
max14830: max14830@3 {
compatible = "maxim,max14830";
spi-max-frequency = <15000000>;
reg = <0>; // SPI chip select number
clocks = <&clk16m0>;
clock-names = "osc";
interrupt-parent = <&gpio5 11>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
gpio-controller; // Marks the device node as a GPIO controller
#gpio-cells = <2>;
clk16m0: clk16m0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <3686400>;
clock-accuracy = <100>;
};
};
};
&iomuxc {
pinctrl_gpio2: gpio2-grp { /* On X22 Camera interface */
fsl,pins = <
MX7D_PAD_SD1_CD_B__GPIO5_IO0 0x74 /* SODIMM 69 */
MX7D_PAD_I2C4_SDA__GPIO4_IO15 0x14 /* SODIMM 75 */
MX7D_PAD_ECSPI1_MISO__GPIO4_IO18 0x14 /* SODIMM 79 */
MX7D_PAD_I2C3_SCL__GPIO4_IO12 0x14 /* SODIMM 81 */
MX7D_PAD_ECSPI2_MISO__GPIO4_IO22 0x14 /* SODIMM 85 */
MX7D_PAD_ECSPI1_SS0__GPIO4_IO19 0x14 /* SODIMM 97 */
MX7D_PAD_I2C3_SDA__GPIO4_IO13 0x14 /* SODIMM 94 */
MX7D_PAD_I2C4_SCL__GPIO4_IO14 0x14 /* SODIMM 96 */
MX7D_PAD_SD2_RESET_B__GPIO5_IO11 0x14 /* SODIMM 98 */
>;
};
pinctrl_uart6: uart6grp {
fsl,pins = <
MX7D_PAD_ECSPI1_SCLK__UART6_DTE_TX 0x79 /* SODIMM 101 */
MX7D_PAD_ECSPI1_MOSI__UART6_DTE_RX 0x79 /* SODIMM 103 */
>;
};
pinctrl_uart7: uart7-grp {
fsl,pins = <
MX7D_PAD_ECSPI2_MOSI__UART7_DTE_RX 0x79 /* SODIMM 59 */
MX7D_PAD_ECSPI2_SCLK__UART7_DTE_TX 0x79 /* SODIMM 67 */
>;
};
};
And in dmesg:
[ 0.170378] 30860000.serial: ttymxc0 at MMIO 0x30860000 (irq = 53, base_baud = 1500000) is a IMX
[ 0.903400] printk: console [ttymxc0] enabled
[ 0.908490] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 54, base_baud = 1500000) is a IMX
[ 0.917888] 30880000.serial: ttymxc2 at MMIO 0x30880000 (irq = 55, base_baud = 1500000) is a IMX
[ 0.927278] 30a80000.serial: ttymxc5 at MMIO 0x30a80000 (irq = 60, base_baud = 1500000) is a IMX
[ 0.936632] 30a90000.serial: ttymxc6 at MMIO 0x30a90000 (irq = 61, base_baud = 1500000) is a IMX
...
[ 5.676200] spi2.0: ttyMAX0 at I/O 0x0 (irq = 213, base_baud = 2764800) is a MAX14830
[ 5.714256] spi2.0: ttyMAX1 at I/O 0x20 (irq = 213, base_baud = 2764800) is a MAX14830
[ 5.754157] spi2.0: ttyMAX2 at I/O 0x40 (irq = 213, base_baud = 2764800) is a MAX14830
[ 5.776362] spi2.0: ttyMAX3 at I/O 0x60 (irq = 213, base_baud = 2764800) is a MAX14830
[ 5.801429] spi_imx 30840000.spi: probed
But what i thought wasn’t related but maybe is:
[ 5.592088] imx-sdma 30bd0000.sdma: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2
[ 5.624679] imx-sdma 30bd0000.sdma: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2
[ 5.649985] imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware
When i try the ttymxc5 and 6 with a loop, the result cat /proc/tty/driver/IMX-uart
serinfo:1.0 driver revision:
0: uart:IMX mmio:0x30860000 irq:53 tx:48755 rx:518 RTS|DTR|DSR
1: uart:IMX mmio:0x30890000 irq:54 tx:0 rx:0 RTS|DTR|DSR
2: uart:IMX mmio:0x30880000 irq:55 tx:0 rx:4096 RTS|DTR|DSR
5: uart:IMX mmio:0x30A80000 irq:60 tx:11 rx:4096 DSR
6: uart:IMX mmio:0x30A90000 irq:61 tx:16 rx:4096 DSR
The 4096 is the size of the buffer, and this number only goes up with steps of 4096…
Any ideas?